/**
  * AntRanking Copyright (c) 2008-2012 INRIA, University of Lille 1
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2 of the License, or (at your option) any later version.
  *
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * 
  * Contact: 
  * 	benjamin.bertein@gmail.com,
  * 	nacim.hamdad@gmail.com
  * 	nicolas.haderer@inria.fr
  *
  * Author: Nacim Hamdad,Benjamin Bertein, Haderer Nicolas
  */
package com.google.antranking;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View.OnClickListener;
import android.view.View;
import android.view.Window;
import android.widget.Button;

abstract public class AbstractAntRankingActivity extends Activity {

	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
		
		this.onAtCreate(savedInstanceState);
		
		getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE,R.layout.header);
		
		((Button)this.findViewById(R.id.layout_header_bt_home))
				.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				final Intent intent = new Intent(getBaseContext(),AntRankingActivity.class);
				startActivity(intent);
			}
		});
		
	}
	
	abstract public void onAtCreate(Bundle savedInstanceState);	
}
